<!DOCTYPE html>
<html lang="zh-CN">
<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0,
   maximum-scale=1.0, user-scalable=no">
   <meta http-equiv="X-UA-Compatible" content="le=edge">
   <title>会动的代码</title>
</head>
<body>
    <style id="style"></style>
    <div id="html"></div>
    <div id="div1Wrapper">
        <div id="div1"></div>
    </div>
    
    <style>
        *{margin: 0;padding: 0;}
        *{box-sizing: border-box;}
        *::after{box-sizing: border-box;}
        *::before{box-sizing: border-box;}

        #demo{
            word-break: break-all;
        }

        #div1{
            position: fixed;
            left: 50%;
            transform: translateX(-50%);
            top: 20px;
        }

        #div1::before{
            content: ''; 
            display: block;
            position: absolute;
        }

        #div1::after{
            content: ''; 
            display: block;
            position: absolute;
        }

        @media (max-width:500px) {
            #html {
                height: 50vh;
                overflow: auto;
            }

            #div1Wrapper {
                height: 50vh;
            }

            #div1 {
                position: relative;
                top: 0;
                right: 0;
            }
        }
    </style>
    <script src="main.js"></script>
</body>
</html>
